package cn.csg.iotplatform.module.system.controller.admin.file;

import cn.csg.iotplatform.framework.common.pojo.CommonResult;
import cn.csg.iotplatform.module.system.controller.admin.file.vo.EqtFileSaveVO;
import cn.csg.iotplatform.module.system.controller.admin.manufacturer.vo.ManufacturerSaveReqVO;
import cn.csg.iotplatform.module.system.service.eqfile.EqtFileService;
import com.alibaba.fastjson.JSONObject;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;

import static cn.csg.iotplatform.framework.common.pojo.CommonResult.success;

/**
 * @author Clqv
 * @create 2024--11--11 11:15
 */
@Tag(name = "管理后台 - 共库附件")
@RestController
@RequestMapping("/system/eqFile")
@Validated
public class EqtFileController {

    @Resource
    private EqtFileService eqtFileService;

    @PostMapping("/create")
    @Operation(summary = "同步共库附件信息")
    public CommonResult<JSONObject> syncFile(@RequestBody EqtFileSaveVO eqtFileSaveVO) {
        return success(eqtFileService.syncFile(eqtFileSaveVO));
    }


}
